+2005-08-30 Matthias Clasen <mclasen@redhat.com>
+
+ * io-png.c (png_save_to_callback_write_func): Add a cast
+ to avoid compiler warnings.
+
+ * pixops/timescale.c (main): Declare src_buf, dest_buf as
+ unsigned to avoid compiler warnings.
+
+ * gdk-pixbuf-io.h: Declare the prefix and mask members of
+ GdkPixbufModulePattern as char*, to avoid compiler warnings.
+
+ * io-ani.c (ani_load_chunk): Use g_try_new() in some places.
+
2005-08-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.2 ===
gchar m;
GdkPixbufModulePattern *pattern;
gboolean anchored;
- guchar *prefix, *mask;
+ gchar *prefix, *mask;
for (pattern = module->info->signature; pattern->prefix; pattern++) {
if (pattern->mask && pattern->mask[0] == '*') {
typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
struct _GdkPixbufModulePattern {
- unsigned char *prefix;
- unsigned char *mask;
+ char *prefix;
+ char *mask;
int relevance;
};
context->animation->width = 0;
context->animation->height = 0;
- context->animation->pixbufs = (GdkPixbuf**) g_try_malloc (sizeof (GdkPixbuf*) * context->NumFrames);
- if (context->animation->pixbufs)
- memset (context->animation->pixbufs, 0, sizeof (GdkPixbuf*) * context->NumFrames);
-
- context->animation->delay = (guint32*) g_try_malloc (sizeof (guint32) * context->NumSteps);
- context->animation->sequence = (guint32*) g_try_malloc (sizeof (guint32) * context->NumSteps);
+ context->animation->pixbufs = g_try_new0 (GdkPixbuf*, context->NumFrames);
+ context->animation->delay = g_try_new (gint, context->NumSteps);
+ context->animation->sequence = g_try_new (gint, context->NumSteps);
+
if (!context->animation->pixbufs ||
!context->animation->delay ||
!context->animation->sequence)
return FALSE;
}
context->title[context->chunk_size] = 0;
- read_int8 (context, context->title, context->chunk_size);
+ read_int8 (context, (guchar *)context->title, context->chunk_size);
#ifdef DEBUG_ANI
g_print ("INAM %s\n", context->title);
#endif
return FALSE;
}
context->author[context->chunk_size] = 0;
- read_int8 (context, context->author, context->chunk_size);
+ read_int8 (context, (guchar *)context->author, context->chunk_size);
#ifdef DEBUG_ANI
g_print ("IART %s\n", context->author);
#endif
{
SaveToFunctionIoPtr *ioptr = png_get_io_ptr (png_ptr);
- if (!ioptr->save_func (data, length, ioptr->error, ioptr->user_data)) {
+ if (!ioptr->save_func ((gchar *)data, length, ioptr->error, ioptr->user_data)) {
/* If save_func has already set an error, which it
should have done, this won't overwrite it. */
png_error (png_ptr, "write function failed");
int main (int argc, char **argv)
{
int src_width, src_height, dest_width, dest_height;
- char *src_buf, *dest_buf;
+ unsigned char *src_buf, *dest_buf;
int src_index, dest_index;
int i;
double scale_times[3][3][4];